package com.haixiaoke.saas.repository.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.haixiaoke.saas.repository.core.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 订单锁单对象 biz_order_lock
 *
 * @author panda
 * @date 2023-04-23
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderLock extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    private Long lockId;

    /**
     * 订单id
     */
    private String orderId;

    /**
     * 房屋id
     */
    private String houseId;

    /**
     * 预约人id
     */
    private String reservationId;

    /**
     * 入住时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date checkInTime;

    /**
     * 退房时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date checkOutTime;

    public OrderLock(String orderId, Date checkInTime, Date checkOutTime) {
        this.orderId = orderId;
        this.checkInTime = checkInTime;
        this.checkOutTime = checkOutTime;
    }
}